<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="jt.classic.system.user.IUser"%>
<%@ page import="jt.classic.system.object.IObject"%>
<%@ page import="jt.classic.system.workflow.WObject"%>
<%@ page import="org.limp.mine.StringTool"%>
<%@ page import="org.limp.mine.DateTrimmer"%>
<%@ page import="java.util.List"%>
<%@ page import="java.util.Map"%>
<%
	String context = jt.classic.system.ISystem.getContextPath();

	IObject obj = (IObject)request.getAttribute("object");

	WObject wobject = (WObject) request.getAttribute("wobject");
	
	Map lxInfo = (Map)((List)obj.icontent(wobject.itable("APP_LX"))).get(0);
	
	String pqrName = (String)lxInfo.get("PQRNAME");
	
	List list = (List)obj.icontent(wobject.itable("APP_LXDTL"));
	
	List list1 = (List)obj.icontent(wobject.itable("APP_XFHANDLER"));
	
	String id = StringTool.checkString(request.getParameter("id"));
	
	String querykey = StringTool.checkString(request.getParameter("querykey"));
	
	IUser user = jt.classic.system.ISystem.getSessionUser(request);
	
	String jbrName = pqrName;
	
	if (list1 != null && !list1.isEmpty()) {
		for (int i = 0; i < list1.size(); i++) {
			Map info = (Map)list1.get(i);
			
			jbrName = StringTool.checkString(info.get("H_USERNAME"));
		}
	}	
%>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<TITLE>来信办理</TITLE>
<jsp:include page="../../system/object/initial4edit.jsp"></jsp:include>
<link rel="stylesheet" type="text/css" href="<%=context%>/app/xf/css/xfstyle.css" />
<script src="<%=context %>/app/xf/js/xfinit.js"></script>
<script src="<%=context %>/app/xf/js/lxfc.js"></script>

<script>
		<%
		if (list != null && !list.isEmpty()) {
			for (int i = 0; i < list.size(); i++) {
		%>
     	handleTypeMap.put('lxdtid_<%=i%>', '-1');
		handleTypeMap.put('lxid_<%=i%>', '-1');
		handleTypeMap.put('XF_USERNAME_<%=i%>', '0');
		handleTypeMap.put('XF_USERSEX_<%=i%>', '0');
		handleTypeMap.put('XF_USERAGE_<%=i%>', '0');
		handleTypeMap.put('XF_USERLICENSE_<%=i%>', '0');
		handleTypeMap.put('XF_USERTEL_<%=i%>', '0');
		handleTypeMap.put('XF_USERCODE_<%=i%>', '0');
		handleTypeMap.put('XF_USERADDRESS_<%=i%>', '0');
	 <%          
		    }		
	    }
      %>

     /**
      * 页面初始化
      */
     function init(){
         initLxdjStyle();
         editObject();
     }
</script>
</HEAD>
<BODY style="background-color:#fff;" onload="javascript:init();">
<form id="form1" name="form1" method="post" enctype="multipart/form-data" action="">
<input type="hidden" name="lxid" value="" special="none">
<input type="hidden" name="DJRID" value="" special="none">
<input type="hidden" name="BLSTATUS" value="" special="none">
<input type="hidden" name="LXTYPE" value="" special="none">
<input type="hidden" name="QUBRGROUPID" value="" special="none">
<div>&nbsp;</div>
<table width="800" align="center">
<tr><td align="left">
<input type="button" name="btn0" value=" 来信复查 " class="button0" onclick="javascript:handleFC('<%=obj.id() %>');">
</td></tr>
<tr><td></td></tr>
</table>
<table width="800" class="tab4edit" border="1" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td colspan="4" class="tdtlt"><div align="center">基本信息</div></td>
  </tr>
  <tr>
    <td class="td0">来信日期</td>
    <td><input type="hidden" name="XFTIME" value="" special="date"></td>
    <td class="td0">信息重要程度</td>
    <td><input type="hidden" name="ZYCDID" value="" special="wordbook" wbtype="" wbname="ZYCDNAME">
<input type="hidden" name="ZYCDNAME" value=""></td>
  </tr>
  <tr>
    <td class="td0" width="150">编号</td>
    <td width="250"><input type="text" name="LXCODE" id="LXCODE" /></td>
    <td class="td0" width="150">编号类型</td>
    <td width="250"><input type="hidden" name="BHLXID" value="" special="wordbook" wbtype="" wbname="BHLXNAME">
<input type="hidden" name="BHLXNAME" value=""></td>
  </tr>
  <tr>
    <td width="150" class="td0">来信类型</td>
    <td width="250"><input type="hidden" name="LXLXID" value="" special="wordbook" wbtype="" wbname="LXLXNAME">
<input type="hidden" name="LXLXNAME" value=""></td>
    <td width="150" class="td0">信访原因</td>
    <td width="250"><input type="hidden" name="XFYYID" value="" special="wordbook" wbtype="" wbname="XFYYNAME">
<input type="hidden" name="XFYYNAME" value=""></td>
  </tr>
  <tr>
    <td class="td0">是否区立案</td>
    <td><label>是
        <input type="radio" name="LA" id="LA01" value="1" />
        否
        <input type="radio" name="LA" id="LA02" value="0" checked/>
</label></td>
    <td class="td0"></td>
    <td></td>
  </tr>
  <tr>
    <td class="td0">身份</td>
    <td><input type="hidden" name="SF" value="" special="wordbook" wbtype="" wbname="SFNAME">
<input type="hidden" name="SFNAME" value=""></td>
    <td class="td0">受信人或单位</td>
    <td><input type="text" name="SXRDW" id="SXRDW" /></td>
  </tr>
  <tr>
    <td class="td0">人数</td>
    <td><input type="text" name="RS" id="RS" /></td>
    <td class="td0">所属地</td>
    <td><input type="hidden" name="SSD" value="" special="wordbook" wbtype="" wbname="SSDNAME">
<input type="hidden" name="SSDNAME" value=""></td>
  </tr>
  <tr>
    <td class="td0">信息来源</td>
    <td><input type="hidden" name="XXLYID" value="" special="wordbook" wbtype="" wbname="XXLYNAME">
<input type="hidden" name="XXLYNAME" value=""></td>
    <td class="td0">条形码编号</td>
    <td><input type="text" name="TXM" id="TXM" /></td>
  </tr>
  <tr>
    <td class="td0">是否重复反映</td>
    <td><label>首次反映
        <input type="radio" name="SFCF" id="SFCF01" value="0" checked/>
        重复反映
        <input type="radio" name="SFCF" id="SFCF02" value="1" /><br/>
        一信多投
        <input type="radio" name="SFCF" id="SFCF03" value="2" />
</label></td>
    <td class="td0">被反映单位</td>
    <td><input type="text" name="BFYDW" id="BFYDW" /></td>
  </tr>
  <tr>
    <td class="td0">上级单位</td>
    <td><input type="text" name="SJDW" id="SJDW" /></td>
    <td class="td0">上级单位编号</td>
    <td><input type="text" name="SJBH" id="SJBH" /></td>
  </tr>
  <tr>
    <td class="td0">原始单位</td>
    <td><input type="text" name="YSDW" id="YSDW" /></td>
    <td class="td0">原始单位编号</td>
    <td><input type="text" name="YSDWBH" id="YSDWBH" /></td>
  </tr>
  <tr>
    <td class="td0">原信</td>
    <td colspan="3"><input type="file" name="YX" id="YX" /></td>
  </tr>
  <tr>
    <td colspan="4" class="tdtlt"><div align="center">分类设置</div></td>
  </tr>
  <tr>
    <td class="td0">国家内容分类</td>
    <td><input type="hidden" name="GJNRID" value="" special="wordbook" wbtype="" wbname="GJNRNAME">
<input type="hidden" name="GJNRNAME" value=""></td>
    <td class="td0">性质分类</td>
    <td><input type="hidden" name="XZID" value="" special="wordbook" wbtype="" wbname="XZNAME">
<input type="hidden" name="XZNAME" value=""></td>
  </tr>
  <tr>
    <td class="td0">内容分类</td>
    <td><input type="hidden" name="NRID" value="" special="wordbook" wbtype="" wbname="NRNAME">
<input type="hidden" name="NRNAME" value=""></td>
    <td class="td0">信访问题分类</td>
    <td><input type="hidden" name="XFWTID" value="" special="wordbook" wbtype="" wbname="XFWTNAME">
<input type="hidden" name="XFWTNAME" value=""></td>
  </tr>
  <tr>
    <td class="td0">转送方式</td>
    <td><input type="hidden" name="ZSFSID" value="" special="wordbook" wbtype="" wbname="ZSFSNAME">
<input type="hidden" name="ZSFSNAME" value=""></td>
    <td class="td0">督办类型</td>
    <td><input type="hidden" name="DBLXID" value="" special="wordbook" wbtype="group-rating" wbname="DBLXNAME">
    <input type="hidden" name="DBLXNAME" value=""></td>
  </tr>
  <tr>
    <td colspan="4" class="tdtlt"><div align="center">办理情况</div></td>
  </tr>
  <tr>
    <td class="td0">登记人</td>
    <td><input type="text" name="DJRNAME" id="DJRNAME" value=""/></td>
    <td class="td0">经办人</td>
    <td>
    <input type="text" name="H_USERNAME" id="H_USERNAME" value=""/>
    </td>
  </tr>
  <tr>
    <td class="td0">内容</td>
    <td><textarea name="NR" id="NR" cols="30" rows="5"></textarea></td>
    <td class="td0">关键字</td>
    <td><textarea name="GJZ" id="GJZ" cols="30" rows="5"></textarea></td>
  </tr>
  <tr>
    <td class="td0">处理方式</td>
    <td><input type="hidden" name="CLFSNAME"/></td>
    <td class="td0">限结日期</td>
    <td><input type="hidden" name="XJTIME" value="" special="date"/></td>
  </tr>
  <tr>
    <td colspan="4" class="tdtlt"><div align="center">来信人登记</div></td>
  </tr>
  <tr>
    <td colspan="4" class="nopadding">
       <table border="1" class="tab-noborder" width="100%" cellspacing="0" cellpadding="0">
          <tr>
              <td class="td0" style="border:0px;">来信人姓名</td>
              <td class="td0" style="border:0px;">性别</td>
              <td class="td0" style="border:0px;">年龄</td>
              <td class="td0" style="border:0px;">身份证号</td>
              <td class="td0" style="border:0px;">联系电话</td>
              <td class="td0" style="border:0px;">邮政编码</td>
              <td class="td0" style="border:0px;">单位或地址</td>
          </tr>
          <%
					if (list != null && !list.isEmpty()) {
					for (int i = 0; i < list.size(); i++) {
						
			%>
			<tr>
				<td style="border:0px;"><input type="hidden"
					name="lxdtid_<%=i %>" special="key" id="lxdtid_<%=i %>" /> <input
					type="hidden" name="lxid_<%=i %>" id="lxid_<%=i %>" special="key" /><input
					type="text" name="XF_USERNAME_<%=i %>" id="XF_USERNAME_<%=i %>" /></td>
				<td style="border:0px;"><select name="XF_USERSEX_<%=i %>"
					id="XF_USERSEX_<%=i %>">
					<option value="1">男</option>
					<option value="0">女</option>
				</select></td>
				<td style="border:0px;"><input type="text"
					name="XF_USERAGE_<%=i %>" id="XF_USERAGE_<%=i %>" /></td>
				<td style="border:0px;"><input type="text"
					name="XF_USERLICENSE_<%=i %>" id="XF_USERLICENSE_<%=i %>" /></td>
				<td style="border:0px;"><input type="text"
					name="XF_USERTEL_<%=i %>" id="XF_USERTEL_<%=i %>" /></td>
				<td style="border:0px;"><input type="text"
					name="XF_USERCODE_<%=i %>" id="XF_USERCODE_<%=i %>" /></td>
				<td style="border:0px;"><input type="text"
					name="XF_USERADDRESS_<%=i %>" id="XF_USERADDRESS_<%=i %>" /></td>
			</tr>
			<%
				}
				}
			%>
       </table>
    </td>
  </tr>
</table>	
<%
if (list1 != null && !list1.isEmpty()) {
		for (int i = 0; i < list1.size(); i++) {
			Map info = (Map)list1.get(i);
			
			String hdlstatus = (String)info.get("H_STATUS");
			if(hdlstatus.equals("1")){
%>
<table border="1" class="tab-noborder" style="margin-top:5px;" width="800" cellspacing="0" cellpadding="0" align="center">		
<tr>
	<td style="border:0px;" colspan="2"><b>办理人：</b><%=info.get("H_USERNAME") %>，<b>所在科室：</b><%=info.get("H_GROUPNAME") %>，<b>办理时间：</b><%=DateTrimmer.getYMD_LBL((String)info.get("H_DATE")) %></td>
</tr>
<tr>
	<td style="border:0px;" width="10%" valign="top"><b>回复内容：<b></td>
	<td style="border:0px;" align="left"><%=info.get("H_BACKINFO") %></td>
</tr>
</table>
<%
	  
			}
		}	
	}
%>
<div>&nbsp;</div>
</form>
</BODY>
</HTML>
